/**
 * Copyright (C) 2025 pony working team
 * SPDX-License-Identifier: MulanPSL-2.0
 */

/* define to prevent recursive inclusion -------------------------------------*/
#ifndef __PONY_HAL_DELAY_H__
#define __PONY_HAL_DELAY_H__

/* includes (standard library, system) ---------------------------------------*/
#include <stdint.h>
/* includes (other library) --------------------------------------------------*/
/* includes (project) --------------------------------------------------------*/
/* includes (local) ----------------------------------------------------------*/
#include <hal.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* defines -------------------------------------------------------------------*/
/* typedefs ------------------------------------------------------------------*/
/* macro ---------------------------------------------------------------------*/

#ifndef DELAY_US
#define DELAY_US(n) hal_delay_us(n)
#endif

#ifndef DELAY_MS
#define DELAY_MS(m) hal_delay_ms(m)
#endif

/* inlines -------------------------------------------------------------------*/
/* externs -------------------------------------------------------------------*/

extern void hal_delay_us(uint32_t us);
extern void hal_delay_ms(uint32_t ms);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __PONY_HAL_DELAY_H__ */
